using r for statistics